<!-- #include file="inc/conn.asp" -->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>抽奖活动</title> 

<link rel="stylesheet" type="text/css" href="css/css/hui.css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script type="text/javascript" src="../js/jquery-1.8.3.min.js"></script>
</head>

<body  >  
<header class="hui-header">
<div id="hui-back"></div>
   <h1>抽奖列表 </h1>
   <div id="hui-header-menu" class="hui-icons-nav" style="font-size:16px"></div>
</header> 

<div class="hui-wrap">
<div class="hui-media-list" style="padding:10px;">
        <ul>
          <%
'
sql="select * from lottery where zt='1'  order by id desc" 

  rs.open sql,conn,1,1
  if not rs.eof then
 do while not rs.eof 

if datediff("s",rs("sttime"),now())<0 then
lot_time="<div class='hui-badge hui-primary' style='font-size:12px;float:right'>未开始</div>"
end if

if datediff("s",rs("sttime"),now())>=0 and datediff("s",rs("endtime"),now())<=0 then
lot_time="<span class='hui-badge hui-danger' style='float:right'>进行中</span>"
end if


if  datediff("s",rs("endtime"),now())>0 then
lot_time="<div class='hui-badge ' style='font-size:12px;float:right'>已结束</div>"
end if 

	
  %> 
            <li>
                <a href="lottery.asp?id=<%=rs("id")%>">
                    <div class="hui-media-list-img"><img src="img/cj.png" /></div>
                    <div class="hui-media-content">
                        <h1><%=rs("title")%></h1>
                        
                       <div class="lot_time">起止时间：<%=rs("sttime")%>至<%=rs("endtime")%><%=lot_time%></div>
  
 <div class="hui-button hui-primary hui-fl" >参加抽奖</div> <div class="hui-fr lot_num">抽奖次数:<%=rs("cnum")%></div>
          </div>
                </a>
            </li>
           <%rs.movenext
  	loop
  	end if
	rs.close
  %>
        </ul>
    </div>
 
   


  <div class="clear"></div>
</div>


<script src="css/js/hui.js" type="text/javascript" charset="utf-8"></script>

<script type="text/javascript">
var meuns = ['我的中奖纪录', '后台管理','在线交流'];
var cancel = '关闭菜单';
hui('#hui-header-menu').click(function(){
    hui.actionSheet(meuns, cancel, function(e){
       if(e.index==0){location.href="lottery_list.asp"}
       if(e.index==1){location.href="admin/lottery.asp"}
	    if(e.index==2){location.href="http://book.9416.cn"}
    });
});
</script>


</body>
</html>
